package dataflow.core;

import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class TestLogging {
	
    public static void main(String[] args) {
    	BasicConfigurator.resetConfiguration();
    	PropertyConfigurator.configure("log4j.properties");
    	
        
    	Logger log = Logger.getLogger(TestLogging.class.getName());
        log.info("Starting up...");
        
        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        map.put(1, 1);
        Integer u = map.get(1);
        u++;
        
        System.out.println(map.get(1));
        
        Integer i = 5;
        Integer k = --i;
        System.out.println(i);
        System.out.println(k);
        
        try {
            // Divide by zero.
            int x = 5;
            int y = 20 / (5 - x);
        } catch (Exception e) {
        	
        	if(log.isDebugEnabled()){
        		log.error("Oops!", e);
        	}
        }
        
    }
    

}
